package com.zhang.client;

import com.zhang.entity.OrderInfo;
import com.zhang.result.RetVal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;


//该远程接口是由哪个微服务去实现
@FeignClient(value = "shop-order")
public interface OrderFeignClient {

    //订单确认信息
    @GetMapping("/order/confirm")
    public RetVal confirm();

    //3.根据订单id查询订单信息
    @GetMapping("/order/getOrder/{orderId}")
    public OrderInfo getOrder(@PathVariable Long orderId);

    //5.保存订单及其详情信息
    @PostMapping("/order/saveOrderAndDetail")
    public Long saveOrderAndDetail(@RequestBody OrderInfo orderInfo);
}
